package cn.edu.scau.cmi.chenyuanying.safedComposite;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Team extends Organization {
	private List<Organization> list;

	public Team(String name) {
		super(name);
		list = new ArrayList<Organization>();
	}
	
	public void add(Organization o) {
		list.add(o);
	}
	
	public void remove(Organization o) {
		list.remove(o);
	}
	
	public Organization getChild(int index) {
		return list.get(index);
	}

	public Iterator<Organization> elements(){
		return list.iterator();
	}
}
